var SelectMenuPage = {
	'save': function() {
		var obj = $("#selectMenuFrm").serializeObject();
		
		var mWindow = MsgBox.getCurrentOpenDialogWindow();
		
		var parentPage = mWindow[obj.pageKey];
		if (parentPage && parentPage.onMenuValuesSelected && ObjectUtil.isFunction(parentPage.onMenuValuesSelected)) {
			var value = null;
			if (obj.type == '2') {
				// 获取所有选中的子节点id
				value = menuTree.getCheckedLeafNodesIds();
			}
			if (obj.type == '1') {
				value = menuTree.getCheckedNodeIds();
			}
			parentPage.onMenuValuesSelected(value);
			$("[data-dismiss='dialog-box']")[0].click();
		}
	},
	'onSelected': function(node) {
		
	},
	'onChecked': function(event, treeId, treeNode) {
		
	},
	'onFinishLoad': function() {
		var obj = $("#selectMenuFrm").serializeObject();
		
		var mWindow = MsgBox.getCurrentOpenDialogWindow();
		
		var parentPage = mWindow[obj.pageKey];
		if (ObjectUtil.isFunction(parentPage.getInitMenus)) {
			var menus = parentPage.getInitMenus();
			menuTree.checkNodesWithIdArray(menus);
		}
	}
};